#Boa:MDIChild:MDIChildFrame1

import wx
import wx.grid
from ArrayGrid import ArrayGrid, numpy

def create(parent):
    return MDIChildFrame1(parent)

[wxID_MDICHILDFRAME1] = [wx.NewId() for _init_ctrls in range(1)]

class MDIChildFrame1(wx.MDIChildFrame):
    _custom_classes = {'wx.grid.Grid': ['ArrayGrid', 'ArrayGrid']}
    def _init_ctrls(self, prnt):
        # generated method, don't edit
        wx.MDIChildFrame.__init__(self, id=wxID_MDICHILDFRAME1, name='',
              parent=prnt, pos=wx.Point(388, 241), size=wx.Size(594, 497),
              style=wx.DEFAULT_FRAME_STYLE, title='MDIChildFrame1')
        self.SetClientSize(wx.Size(586, 470))
        self.Center()

    def __init__(self, parent, ary=None):
        self._init_ctrls(parent)
        if ary==None:
            ary = self.testArray()
        self.ary = ary
        self.grid1 = ArrayGrid(self, ary)
        
    def testArray(self):
        a = numpy.array(range(10000))
        a.shape = (100, 100)
        return a
    
    def getArray(self):
        return self.ary

